extends Talent

func init():
	name = "重型鱼雷"
func _connect():
	sys.main.connect("onBattleStart",self,"run5")
	sys.main.connect("onCharaNewChara", self, "onCharaNewChara")

func onCharaNewChara(cha):
	if cha.team == 1:
		cha.addBuff(b_chuantouSS.new(lv))	

func run5():
	for i in sys.main.btChas:
		if i.team == 1:
			i.addBuff(b_chuantouSS.new(lv))
#30 35 40 45 50
func get_info():
	return "鱼雷获得%d%%的护甲穿透"%[25+lv*5]

class b_chuantouSS extends "../../azurlane_ctrl/AzurBuff.gd":
	var tlv = 1
	func _init(tlv = 1):
		attInit()
		dispel = 2
		id = "b_chuantouSS"
		self.tlv = tlv
	func _connect():
		masCha.connect("onAtkChara",self,"_onAtkChara")
	func _onAtkChara(atkInfo:AtkInfo):
		if atkInfo.atkType == sys.AtkType.TORPEDO and atkInfo.skill == "鱼雷":
			atkInfo.penL += (0.25 + tlv*0.05)
